<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
	<head>
		<title>团队账变</title>
		<%@include file="/WEB-INF/base.jspf"%>
		<style>
		 body {
		 	padding:30px;
		 }
		 .div-c-searchTool {
		 	display:flex;
		 	align-items:center;
		 }
		 .div-c-searchTool input[type='date'].form-control {
		 	width:150px;
		 }
		 .div-c-searchTool select.form-control {
		 	width:140px;
		 }
		 .div-c-searchTool input[type='text'].form-control {
		 	width:160px;
		 }
		 .div-c-searchTool * {
		 	margin-right:6px;
		 }
		 .div-c-searchTool {
		 	margin-bottom:10px;
		 }
		 span.btn {
		 	cursor: default;
		 }
		</style>
	</head>
	<body style="">
<div class="div-c-main">
		<div class="div-c-searchTool">
			<input type="date" class="form-control" id="ipnut-i-date1" />
			<input type="date" class="form-control" id="ipnut-i-date2" />
			<input type="text" class="form-control" id="input-i-account" placeholder="会员账号" />
			<select class="form-control" id="select-i-type">
				<option value=''>全部类型</option>
				<option value='人工扣款'>人工扣款</option>
				<option value='代理返点'>代理返点</option>
				<option value='充值赠送'>充值赠送</option>
				<option value='彩票投注'>彩票投注</option>
				<option value='彩票派奖'>彩票派奖</option>
				<option value='快速充值'>快速充值</option>
				<option value='快速提款'>快速提款</option>
				<option value='提款失败'>提款失败</option>
				<option value='提款失败退还手续费'>提款失败退还手续费</option>
				<option value='提款手续费'>提款手续费</option>
				<option value='每日返水'>每日返水</option>
				<option value='百家乐投注'>百家乐投注</option>
				<option value='百家乐派奖'>百家乐派奖</option>
				<option value='红包扣除'>红包扣除</option>
				<option value='红包抽中'>红包抽中</option>
				<option value='聊天室发红包'>聊天室发红包</option>
				<option value='聊天室收红包'>聊天室收红包</option>
			</select>
			<input type="text" class="form-control" id="input-i-orderId" placeholder="订单号" />
			<button class="btn btn-primary" id="button-i-searchAJAXTable">查询</button>
			<button class="btn btn-primary" id="button-i-resetAJAXTable">重置</button>
		</div>
<table id="table-i-subLevelList" class="table-normal-datatables table table-striped table-bordered table-hover">
		<thead>
			<tr>
				<th>编号</th>
				<th>会员账号</th>
				<th>变动类型</th>
				<th>变动前金额(元)</th>
				<th>变动金额(元)</th>
				<th>变动后金额(元)</th>
				<th>变动时间(系统)</th>
				<th>订单号</th>
				<th>备注</th>
			</tr>
		</thead>
		<tbody>
		</tbody>
	</table>		
	</div>				
	</body>
	<script type="text/javascript" src="/js/zhengzeTools.js"></script>
	<script>
	//initAllTable()
 		var dataTable = $("#table-i-subLevelList").DataTable({
		      // "bPaginate": true,
		      "bLengthChange": true,      
		      "bSort": false,
		      "bAutoWidth": false,
		      'aLengthMenu':[10, 20],
		       "searching": false,
		       "dom": `ftp`,
		       "language": {//语言设置  
		            "lengthMenu": "每页显示 _MENU_ 条记录",     
		            "zeroRecords": "没有检索到数据",     
		            "sInfo": "当前显示 _START_ 到 _END_ 条，共 _TOTAL_ 条记录",     
		            "info": "没有数据",     
		            "oPaginate": {     
		                "sFirst": "首页",     
		                "sPrevious": "前一页",     
		                "sNext": "后一页",     
		                "sLast": "尾页"    
		          	},
		            "search":"搜索:",
		            "infoFiltered":   "(从  _MAX_ 记录中搜索出结果)",
		            "infoEmpty":      "没有找到匹配的信息",
		         },
		         "ajax": {
		        	 "type": "POST",
		        	 "url":"/userAgent/showList.do",
 		        	 "dataSrc": function(json) {
		        		 var newJson = json.data
		        		 if (newJson == "未检索到信息") {
		        			 return []
		        		 }
 		        		 for (var i = 0; i < newJson.length; i++) {
		         			 var item = newJson[i]
		         			 item.indexValue = i + 1
		        			 if (item.state == "1") {
		        				 item.state = "<span class='bootstrap-background success'>启用</span>"
		        			 } else {
		        				 item.state = "<span class='bootstrap-background danger'>禁用</span>"
		        			 }
		         			 if (item.icode == null) {
		         				 item.icode = "<span class='bootstrap-background success'>会员</span>"
		         			 } else {
		         				item.icode = "<span class='bootstrap-background info'>代理</span>" 
		         			 }
		        		 } 
		        		 return newJson
		        	 },
		         },
  		         "columns": [
							 {"data": "indexValue",},
		                     {"data": "huiyuanzh",},
		                     {"data": "bdtype",},
		                     {"data": "bdqjine",},
		                     {"data": "bdjine",},
		                     {"data": "bdhjine",},
		                     {"data": "createtime",},
		                     {"data": "ordernum",},
		                     {"data": "beizhu",},
		                 ]
		   		 })
		bindSearchBtnAndResetBtnEvent({
			search: "#button-i-searchAJAXTable",
			reset: "#button-i-resetAJAXTable",
			table: "#table-i-subLevelList",
			params: ["#ipnut-i-date1", "#ipnut-i-date2", "#input-i-account", "#select-i-type", "#input-i-orderId"],
		})		 	
	</script>
</html>
